<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
       <title>Outil de mise en forme</title>
</head>
<body>
<?php
include("../include/vars_adm.php");
include("../include/util.inc.php");
connecte($host,$user,$mdp,$db);
for ($i=1;$i<8;$i++) {
$sql = "SELECT libelle,id_form FROM champs_form WHERE id_page=$i;";
print "<h1>$i</h1>";
$res = query($sql);
while (list($libelle,$id_form) = mysql_fetch_row($res)) {
	$l = explode("? Oui/",$libelle);
	if (count($l)==2) {
		print "<p>$libelle<br>".count($l)."<br>$l[0]<br>$l[1]</p>";
	    $libelle = $l[0]."?|Oui/".$l[1];
	    $sql = "UPDATE champs_form SET libelle=\"$libelle\" WHERE id_form=$id_form;";
	    print "<p>$sql</p>";
	    query($sql);
	}
}
if ($i==1) $i=5; // pour traiter id_page 1, 6 et 7
}
?>
</body>
</html>
